package com.songshuai.sales.client;

import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import org.apache.commons.lang3.time.StopWatch;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;

import java.text.SimpleDateFormat;
import java.util.Date;
@EnableEurekaClient
@EnableFeignClients
@EnableHystrix
@SpringBootApplication
//@EnableHystrixDashboard
@EnableApolloConfig
@MapperScan("com.songshuai.sales.client.dao")
public class SalesClientApplication {
    public static void main(String[] args) {
        StopWatch sw = new StopWatch();
        sw.start();
        System.setProperty("apollo.configService", "http://118.25.41.11:8080");
        ConfigurableApplicationContext applicationContext = SpringApplication.run(SalesClientApplication.class, args);
        System.out.println(new SimpleDateFormat("[yyyy-MM-dd HH:mm:ss]").format(new Date())
                + "SalesClientApplication server started!");
        sw.stop();
        System.out.println("SalesClientApplication Launch Time: " + sw.toString());
    }
}

